package com.cseg674.dataentry.javaparser;

import java.util.LinkedList;
 
/**
    * The base class for all object used to define JAVA source elements in RDF format
    */
public class RdfTreeNode {
    
    private String ID;
    private String name;
    private String type;
    private String[] fullname;
    private RdfTreeNode superNode;
    private String modifier;
    private String accesslevel;
    private String prefix;//package name
    private LinkedList <String> attributes;
    static private int index = 0;
    /** Creates a new instance of RdfTreeNode */
    public RdfTreeNode() {
        this("default");
    }
    public RdfTreeNode(String prefix){
        this(prefix, null, null);
    }
    public RdfTreeNode(String name, String type) {
        this("default", name, type);        
    }
    public RdfTreeNode(String prefix, String name, String type) {
        this.prefix = prefix;
        index ++;
        this.ID = prefix + String.valueOf(index);
        this.name = name;
        this.type = type;
    }
	
	/**
     * Add attribute a to the linked list
	 * @param String
     * @return Boolean
     */
    public boolean addAttribute(String a) {
        return attributes.add(a);
    }
	
    /**
     * Get the RdfTreeNode ID
	 * @param None
     * @return String
     */
	public String getID() {
        return this.ID;
    }
	
	/**
     * Get the RdfTreeNode name
	 * @param None
     * @return String
     */
    public String getName() {
        return this.name;
    }
	
	/**
     * Get the RdfTreeNode type
	 * @param None
     * @return String
     */
    public String getType() {
        return this.type;
    }
	
	/**
     * Get the RdfTreeNode full name
	 * @param None
     * @return String
     */
    public String[] getFullname() {
        return this.fullname;
    }
	
	/**
     * Get the super node of a given RdfTreeNode
	 * @param None
     * @return RdfTreeNode
     */
    public RdfTreeNode getSuperNode() {
        return this.superNode;
    }
	
	/**
     * Get the RdfTreeNode modifier
	 * @param None
     * @return String
     */
    public String getModifier() {
        return this.modifier;
    }
    
	/**
     * Get the RdfTreeNode access level
	 * @param None
     * @return String
     */
	public String getAccesslevel() {
        return this.accesslevel;
    }
	
	/**
     * Set the RdfTreeNode ID
	 * @param String
     * @return None
     */
    public void setID(String ID) {
        this.ID=ID;
    }
	
	/**
     * Set the RdfTreeNode name
	 * @param String
     * @return None
     */
    public void setName(String name) {
        this.name=name;
    }
	
	/**
     * Set the RdfTreeNode type
	 * @param String
     * @return None
     */
    public void setType(String type) {
        this.type=type;
    }
	
	/**
     * Set the RdfTreeNode access level
	 * @param String
     * @return none
     */
    public void setAccesslevel(String accesslevel) {
        this.accesslevel=accesslevel;
    }
	
	/**
     * Set the RdfTreeNode full name
	 * @param String[]
     * @return None
     */
    public void setFullname(String[] fullname) {
        this.fullname=fullname;
    }
	
	/**
     * Set the RdfTreeNode supernode
	 * @param RdfTreeNode
     * @return None
     */
    public void setSuperNode(RdfTreeNode superNode) {
        this.superNode=superNode;
    }
	
	/**
     * Set the RdfTreeNode modifier
	 * @param String
     * @return None
     */
    public void setModifier(String modifier) {
        this.modifier=modifier;
    }

    
}
